import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
// import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom'

import store from './store';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { persistor } from './store';
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);

root.render(
  // <React.StrictMode>
  <Suspense fallback={<div><img src="https://gss0.baidu.com/70cFfyinKgQFm2e88IuM_a/baike/pic/item/aa64034f78f0f7360e0f32190155b319ebc41330.jpg" alt="" /></div>}>
    <BrowserRouter >
      <Provider store={store}>
        <PersistGate persistor={persistor}>
          <App />
        </PersistGate>

      </Provider>
    </BrowserRouter>
  </Suspense>
  // </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
